<template>
  <view class="page-view">	  
	  <view class="top-bg">
		  <u-sticky>
	  	<view class="return" @click="goToBack()">
	  		<u-icon name="arrow-left" color="#ffffff " bold="true" size="38"></u-icon>
	  	</view>	
			运维详情
		</u-sticky>
	  </view>   
	  <view class="posBox">
		  <RcywDetail v-if="type=='1'" :dailyYwData="obj"></RcywDetail>
		  <GdclDetail v-if="type=='2'" :dailyYwData="obj"></GdclDetail>
		  <SzjcDetail v-if="type=='3'" :dailyYwData="obj"></SzjcDetail>
		  <GzfkDetail v-if="type=='4'" :dailyYwData="obj"></GzfkDetail>
	  </view>
  </view>
</template>
<script>
import RcywDetail from './rcywDetail.vue';
import GdclDetail from './gdclDetail.vue';
import SzjcDetail from './szjcDetail.vue';
import GzfkDetail from './gzfkDetail.vue';
import {getProFeedbackDetail,getDailyYwDetail,getOmPoliceDetail,getWaterTestDetail} from '@/api/yunwei.js'
export default {
  filters: {},
  components:{RcywDetail,GdclDetail,SzjcDetail,GzfkDetail},
  data() {
    return {
     type:'',
	 id:'',
	 obj:{},
	 // imgList:[],
    };
  },
  onLoad(options) {
    this.type=options.type
    this.id=options.id
	if(options.type==4){
		this.getProFeedbackDetail()
	}else if(options.type==1){
		this.getDailyYwDetail()
	}else if(options.type==2){
		this.getOmPoliceDetail()
	}else{
		this.getWaterTestDetail()
	}
	
  },
  methods: {
	  goToBack(){
	    wx.navigateBack({
	        delta: 1
	      });
	  },
	async getProFeedbackDetail(){
		const res=await getProFeedbackDetail({id:this.id})
		if(res.data.code==200){
			this.obj=res.data.result
			// this.imgList=this.obj.picUrl?.split(',')||[]
		      }
	},
	async getDailyYwDetail(){
		const res=await getDailyYwDetail({id:this.id})
		if(res.data.code==200){
			this.obj=res.data.data
		      }
	},
	async getOmPoliceDetail(){
		const res=await getOmPoliceDetail({id:this.id})
		if(res.data.code==200){
			this.obj=res.data.data
		      }
	},
	async getWaterTestDetail(){
		const res=await getWaterTestDetail({id:this.id})
		if(res.data.code==200){
			this.obj=res.data.data
		      }
	},
  }
};
</script>
<style scoped lang="scss">
.page-view {
  height: 100vh;
  // background: #f8f9fb;
  position: relative;
  overflow: hidden;
}
.posBox{
	  position: absolute;
	  top: 200rpx;
	  width: 100%;
  }
.top-bg{
	width: 100%;
	height: 330rpx;
	background: #2769F7;
	border-radius: 0rpx 0rpx 140rpx 140rpx;
	padding-top: 104rpx;
	text-align: center;
	font-weight: 600;
	font-size: 40rpx;
	color: #FFFFFF;
	letter-spacing: 4rpx;
	position: relative;
	.return{
		position: absolute;
		left: 32rpx;
		margin-top: 8rpx;
	}
}
.scroll-Y {
  height: 100%;
}
/deep/ .u-input--radius{
 	// width: 324rpx;
 	// height: 60rpx;
 	background: #F2F6F7;
 	border-radius: 10rpx 10rpx 10rpx 10rpx;
 }
 /deep/ .u-search__content{
	 padding: 0 10rpx !important;
 }
</style>
